<?php

// 限时抢购商品表

namespace app\shop\model;

use think\Model;

class Limited extends Model
{
    // 限时抢购 限时抢购分类表 关联
    public function LimitedType()
    {
        return $this->hasMany('LimitedType','id','parenTid')->field('id,end_time');
    }


    // 限时抢购 商品表 关联
    public function ShopGoods()
    {
        return $this->hasOne('ShopGoods','id','goods_id')->field('id,title,thumb_img,rebate_percentage,price,goods_id,goods_str,inventory');
    }
}